// Learn TypeScript:
//  - https://docs.cocos.com/creator/manual/en/scripting/typescript.html
// Learn Attribute:
//  - https://docs.cocos.com/creator/manual/en/scripting/reference/attributes.html
// Learn life-cycle callbacks:
//  - https://docs.cocos.com/creator/manual/en/scripting/life-cycle-callbacks.html

import { off } from "node:process";
import { EventType } from "./../Base/EventType";

const { ccclass, property } = cc._decorator;

@ccclass
export default class NewClass extends cc.Component {

    public currentScale = 1;
    public currentLocalPos = cc.v2(0, 0);
    onLoad() {

        this.node.on(EventType.Scale.toString(), this.scaleLine.bind(this));
    }
    scaleLine(scrollY, localPos) {
        this.currentScale += 0.01 * scrollY / Math.abs(scrollY);



        this.drawBgLayer(50 * this.currentScale, localPos, this.currentScale);
    }
    start() {
        this.drawBgLayer(50, cc.v2(0, 0), 1);

    }
    drawBgLayer(width, localPos, scale) {



       
    }

    // update (dt) {}
}
